/// id : 128
/// examTitle : "20210127安全教育考试"
/// updateTime : "2021-02-17 11:02:11"
/// createTime : "2021-02-17 11:02:11"
/// openTime : null
/// closeTime : null
/// mineId : 25
/// questionDelete : 0
/// ruleSign : 0
/// ruleJudge : 0
/// ruleMult : 0
/// ruleGap : 0
/// isAna : 1
/// trainExam : 1
/// ruleContent : null
/// isOpen : 1
/// examTim : 30
/// examPercent : 60
/// examUid : "b5c6d654e0df483e9325c43b8c1ca36c"
/// flag : false
/// qeuestWSelectList : [{"id":128,"mineId":0,"questionTitle":null,"questionUid":null,"questionDef":0,"questionDelete":0,"questContent":null,"updateDate":null,"createTime":null,"parent":0,"questionTypeList":null,"defaultQ":null}]
/// departAllSelect : false
/// departmentSelectEnityList : []

class BeanExam {
  int id;
  String examTitle;
  String updateTime;
  String createTime;
  dynamic openTime;
  dynamic closeTime;
  int mineId;
  int questionDelete;
  int ruleSign;
  int ruleJudge;
  int ruleMult;
  int ruleGap;
  int isAna;
  int trainExam;
  dynamic ruleContent;
  int isOpen;
  int examTim;
  int examPercent;
  int examNumber;
  String examUid;
  bool flag;
  List<QeuestWSelectListBean> qeuestWSelectList;
  bool departAllSelect;
  List<dynamic> departmentSelectEnityList;

  static BeanExam fromMap(Map<String, dynamic> map) {
    if (map == null) return null;
    BeanExam beanExamBean = BeanExam();
    beanExamBean.id = map['id'];
    beanExamBean.examTitle = map['examTitle'];
    beanExamBean.updateTime = map['updateTime'];
    beanExamBean.createTime = map['createTime'];
    beanExamBean.openTime = map['openTime'];
    beanExamBean.closeTime = map['closeTime'];
    beanExamBean.mineId = map['mineId'];
    beanExamBean.questionDelete = map['questionDelete'];
    beanExamBean.ruleSign = map['ruleSign'];
    beanExamBean.ruleJudge = map['ruleJudge'];
    beanExamBean.ruleMult = map['ruleMult'];
    beanExamBean.ruleGap = map['ruleGap'];
    beanExamBean.examNumber = map['examNumber'] ?? 1;

    beanExamBean.isAna = map['isAna'];
    beanExamBean.trainExam = map['trainExam'];
    beanExamBean.ruleContent = map['ruleContent'];
    beanExamBean.isOpen = map['isOpen'];
    beanExamBean.examTim = map['examTim'];
    beanExamBean.examPercent = map['examPercent'];
    beanExamBean.examUid = map['examUid'];
    beanExamBean.flag = map['flag'];
    beanExamBean.qeuestWSelectList = List()
      ..addAll((map['qeuestWSelectList'] as List ?? [])
          .map((o) => QeuestWSelectListBean.fromMap(o)));
    beanExamBean.departAllSelect = map['departAllSelect'];
    beanExamBean.departmentSelectEnityList = map['departmentSelectEnityList'];
    return beanExamBean;
  }

  Map toJson() => {
        "id": id,
        "examTitle": examTitle,
        "updateTime": updateTime,
        "createTime": createTime,
        "openTime": openTime,
        "closeTime": closeTime,
        "mineId": mineId,
        "questionDelete": questionDelete,
        "ruleSign": ruleSign,
        "ruleJudge": ruleJudge,
        "ruleMult": ruleMult,
        "ruleGap": ruleGap,
        "isAna": isAna,
        "trainExam": trainExam,
        "ruleContent": ruleContent,
        "isOpen": isOpen,
        "examTim": examTim,
        "examPercent": examPercent,
        "examUid": examUid,
        "flag": flag,
        "qeuestWSelectList": qeuestWSelectList,
        "departAllSelect": departAllSelect,
        "departmentSelectEnityList": departmentSelectEnityList,
      };
}

/// id : 128
/// mineId : 0
/// questionTitle : null
/// questionUid : null
/// questionDef : 0
/// questionDelete : 0
/// questContent : null
/// updateDate : null
/// createTime : null
/// parent : 0
/// questionTypeList : null
/// defaultQ : null

class QeuestWSelectListBean {
  int id;
  int mineId;
  dynamic questionTitle;
  dynamic questionUid;
  int questionDef;
  int questionDelete;
  dynamic questContent;
  dynamic updateDate;
  dynamic createTime;
  int parent;
  dynamic questionTypeList;
  dynamic defaultQ;

  static QeuestWSelectListBean fromMap(Map<String, dynamic> map) {
    if (map == null) return null;
    QeuestWSelectListBean qeuestWSelectListBean = QeuestWSelectListBean();
    qeuestWSelectListBean.id = map['id'];
    qeuestWSelectListBean.mineId = map['mineId'];
    qeuestWSelectListBean.questionTitle = map['questionTitle'];
    qeuestWSelectListBean.questionUid = map['questionUid'];
    qeuestWSelectListBean.questionDef = map['questionDef'];
    qeuestWSelectListBean.questionDelete = map['questionDelete'];
    qeuestWSelectListBean.questContent = map['questContent'];
    qeuestWSelectListBean.updateDate = map['updateDate'];
    qeuestWSelectListBean.createTime = map['createTime'];
    qeuestWSelectListBean.parent = map['parent'];
    qeuestWSelectListBean.questionTypeList = map['questionTypeList'];
    qeuestWSelectListBean.defaultQ = map['defaultQ'];
    return qeuestWSelectListBean;
  }

  Map toJson() => {
        "id": id,
        "mineId": mineId,
        "questionTitle": questionTitle,
        "questionUid": questionUid,
        "questionDef": questionDef,
        "questionDelete": questionDelete,
        "questContent": questContent,
        "updateDate": updateDate,
        "createTime": createTime,
        "parent": parent,
        "questionTypeList": questionTypeList,
        "defaultQ": defaultQ,
      };
}
